Object nested and databand problem
Object nested and databand problem
I have created a template in designer and all is working there. Problem is generating PDF, only show no-nested keys from JSON and dont show databand arrays. I have checked MRT file and relations are created. I dont know what to do. I have attached MRT file.
- Attachments
-
- SingleWOSimplified_PM (19).mrt
- (2.3 MiB) Downloaded 69 times
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Object nested and databand problem
Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?
Thank you.
Re: Object nested and databand problem
I attach two PDF files. One create from template with designer and other generated from code. It has data to fill all fields but it doesnt show them if JSON keys are nested.
- Attachments
-
- fromReportLoad.pdf
- (126.8 KiB) Downloaded 71 times
-
- fromDesigner.pdf
- (429.22 KiB) Downloaded 67 times
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Object nested and databand problem
Hello,
Please clarify which product and version are you use?
Could you send a sample project that reproduces the issue for analysis?
Thank you.
Please clarify which product and version are you use?
Could you send a sample project that reproduces the issue for analysis?
Thank you.
Re: Object nested and databand problem
Hi
When I generate the report using the designer desktop (v 2022.4.5) the pdf is ok (see fromDesigner.pdf). But when I generate the report using .NET Engine (v 2022.4.5) the pdf is not ok, some tables are empty.
See table Remarks, Assets, Spares in the pdf generated by designer is ok but not in the file generated by NET library.
When I generate the report using the designer desktop (v 2022.4.5) the pdf is ok (see fromDesigner.pdf). But when I generate the report using .NET Engine (v 2022.4.5) the pdf is not ok, some tables are empty.
See table Remarks, Assets, Spares in the pdf generated by designer is ok but not in the file generated by NET library.
- Attachments
-
- SingleWOSimplified_PM.mrt
- template
- (291.69 KiB) Downloaded 63 times
-
- SWO.IN.PRES.DEMO.PM.AB5143R.json
- json used to load into NET library
- (46.7 KiB) Downloaded 60 times
-
- fromNET.pdf
- (126.83 KiB) Downloaded 54 times
-
- fromDesigner.pdf
- (119.57 KiB) Downloaded 66 times
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Object nested and databand problem
Hello,
> But when I generate the report using .NET Engine (v 2022.4.5) the pdf is not ok, some tables are empty.
Could you show your code or send us a sample project that reproduces the issue?
Thank you.
> But when I generate the report using .NET Engine (v 2022.4.5) the pdf is not ok, some tables are empty.
Could you show your code or send us a sample project that reproduces the issue?
Thank you.
Re: Object nested and databand problem
Hi,
What else do you need? I sent you all the information.
First create object "JObject data" according with the format, then:
// Load the template:
report.Load("SingleWOSimplified_PM.mrt");
// create the dataset
var dataSet = StiJsonToDataSetConverter.GetDataSet(data);
// Assign the dataset
report.RegData("dataSet", dataSet);
The problems raised in the arrays.
If you need further information, I recommend to have a screen sharing session.
Best regards
What else do you need? I sent you all the information.
First create object "JObject data" according with the format, then:
// Load the template:
report.Load("SingleWOSimplified_PM.mrt");
// create the dataset
var dataSet = StiJsonToDataSetConverter.GetDataSet(data);
// Assign the dataset
report.RegData("dataSet", dataSet);
The problems raised in the arrays.
If you need further information, I recommend to have a screen sharing session.
Best regards
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Object nested and databand problem
Hello,
We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
- Attachments
-
- Screenshot 2022-11-28 235450.png (276.33 KiB) Viewed 848 times
Re: Object nested and databand problem
Hello,
Thanks of the response. First, let me comment that the pdf you show does not have the desired information. If you see the number of the dataset is "PM.AB5143R" and in the pdf it's shown "PM.AC0427I" (see the attachment). I think this is the test dataset.
I solved the issue by adding the clear statement (bold).
var report = new StiReport();
report.Load("e:\\SingleWOSimplified_PM.mrt")
var dataSet = StiJsonToDataSetConverterV2.GetDataSetFromFile("C:\\SWO.IN.PRES.DEMO.PM.AB5143R.json")
report.RegData("dataSet", dataSet);
report.Dictionary.DataSources.Clear(); //This comand solved the issue
report.Dictionary.Synchronize();
report.Dictionary.Connect();
report.Render(false);
report.ExportDocument(StiExportFormat.Pdf, "C:\\report.pdf")
Is it correct?
The other issue was the library, I was using StiJsonToDataSetConverter not StiJsonToDataSetConverterV2, what is the difference?
Best regards
Thanks of the response. First, let me comment that the pdf you show does not have the desired information. If you see the number of the dataset is "PM.AB5143R" and in the pdf it's shown "PM.AC0427I" (see the attachment). I think this is the test dataset.
I solved the issue by adding the clear statement (bold).
var report = new StiReport();
report.Load("e:\\SingleWOSimplified_PM.mrt")
var dataSet = StiJsonToDataSetConverterV2.GetDataSetFromFile("C:\\SWO.IN.PRES.DEMO.PM.AB5143R.json")
report.RegData("dataSet", dataSet);
report.Dictionary.DataSources.Clear(); //This comand solved the issue
report.Dictionary.Synchronize();
report.Dictionary.Connect();
report.Render(false);
report.ExportDocument(StiExportFormat.Pdf, "C:\\report.pdf")
Is it correct?
The other issue was the library, I was using StiJsonToDataSetConverter not StiJsonToDataSetConverterV2, what is the difference?
Best regards
- Attachments
-
- Screenshot 2022-11-29 141519.png (40.22 KiB) Viewed 832 times
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Object nested and databand problem
Hello,
StiJsonToDataSetConverter is the old version. You should use StiJsonToDataSetConverterV2 version.
Thank you.
StiJsonToDataSetConverter is the old version. You should use StiJsonToDataSetConverterV2 version.
Thank you.