Hi,
I am trying to create reports by using the sample reportrunner. But i have two problems.
1- how can i add parameters to the report? I am using this code:
simpleParmValueItem item = new simpleParmValueItem();
parmValueItem[] pvi = new parmValueItem[1];
parameterValue pv = new parameterValue();
item.use = "FARMACIA OTC";
string nome = "P1_Sel_Alvo";
pvi[0] = item;
pv.name = nome;
pv.value = pvi;
but does not work throw an exception.
2- How can i create the report in PDF? I am using an argument that receive the type of the output. And it works with "HTML" and "XML", with "PDF" when try to open the document it give me an error saying that is malformed.
Can u help me guys.
You need to create an array of data type parameterValue and instantiate it with a definite number.
You will then need to pass this array as an argument to the run method of the reportService web service
I have rewritten your code below:
SimpleParmValueItem item = new SimpleParmValueItem();
ParmValueItem pvi[] = new ParmValueItem[1];
parameterValue pv[] = new parameterValue(some number);
pv[0] = new ParameterValue();
pv[0].setName("P1_Sel_Alvo");
...
// Create a new array to contain the values for the parameter.
pvi[0] = item;
pv[0].setValue(pvi);
Get the idea
Post the error message you get when you attempt a PDF rendition.
HTH
NKT