WYSIWYG editing tool for end users.
WYSIWYG editing tool for end users.
WYSIWYG editing tool for end users.
We have had success with DevExpress tools, and basically using their XtraReports suite. We have a maintenance screen where we will open their designer window, and over-ride the saving of the templates to keep the template files in a way that makes sense to our application. Since we are still using VISION files, we push data in XML datasets (which we write in COBOL, only populating the records which matter to the form being generated), then load the temporary XML dataset file into memory on the .NET side. If we had our data in SQL, we could make the data available much more easily, but I wrote a COBOL program which can create an XML dataset with minimal coding based on the XFDs, and using the I$IO routine.
I'm going to attempt to simplify the process a bit, let me know if my explanation is nonsensical :-)
The process works a little like this:
1) User chooses to print an invoice.
2) Our system looks at a VISION file with a list of templates in it, and displays a list of the templates that user is allowed to use - if there is only 1 template available to the user, it is automatically selected, and the user doesn't see the prompt.
3) Based on the key to the invoice header, and whatever other records we indicate should go along with it (we have files that say you can get from the invoice header to the invoice detail by reading all records where field X in the first file matches field Y in the second file), the XML generation program writes out a LINE SEQUENTIAL file with the XML schema. The XML schema is basically the same data from the XFD, but written out in a way the mimics a .NET DataSet (or SQL tables).
4) The XML program then reads the appropriate records using I$IO and writes them to the XML file with appropriate XML markup.
5) A .NET program creates an instance of the DevExpress XtraReport class, an passes in the DataSet which was loaded from the XML file written by the COBOL.
6) The DevExpress class is then instructed to either print the form, or open the preview window, or generate a PDF of the form, depending on some user configuration settings.
Here is a (slimmed down) sample of what the XML looks like for a cash receipt, including a single header record with 3 detail lines plus the customer information:
<?xml version="1.0" standalone="yes"?><Cash_Receipts xmlns="tempuri.org/Cash_Receipts.xsd"> <xs:schema id="Cash_Receipts" targetNamespace="tempuri.org/Cash_Receipts.xsd" xmlns:mstns="tempuri.org/Cash_Receipts.xsd" xmlns="tempuri.org/Cash_Receipts.xsd" xmlns:xs="www.w3.org/.../XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified"> <xs:element name="Cash_Receipts" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="rec_r_cash_header"> <xs:complexType> <xs:sequence> <xs:element name="rec_r_cash_header_ID" type="xs:integer" /> <xs:element name="CAH-NBR" type="xs:string" minOccurs="0" /> <xs:element name="CAH-CUST-NBR" type="xs:integer" minOccurs="0" /> <xs:element name="CAH-CHK-AMT" type="xs:decimal" minOccurs="0" /> <xs:element name="CAH-DATE-REC" type="xs:integer" minOccurs="0" /> <xs:element name="CAH-CHK-NBR" type="xs:string" minOccurs="0" /> <xs:element name="CAH-UNAPP-CASH" type="xs:decimal" minOccurs="0" /> <xs:element name="CAH-GL-ACC-NBR" type="xs:integer" minOccurs="0" /> <xs:element name="CAH-COMMENTS" type="xs:string" minOccurs="0" /> <xs:element name="CAH-YN" type="xs:string" minOccurs="0" /> <xs:element name="CAH-JOB-NBR" type="xs:string" minOccurs="0" /> <xs:element name="CAH-JOB-NUMBER" type="xs:string" minOccurs="0" /> <xs:element name="CAH-JOB-CHG" type="xs:integer" minOccurs="0" /> <xs:element name="CAH-DIRECT-CASH" type="xs:string" minOccurs="0" /> <xs:element name="CAH-APPLY-CR" type="xs:string" minOccurs="0" /> <xs:element name="CAH-UPDATE-STEP" type="xs:string" minOccurs="0" /> <xs:element name="CAH-EMPLOYEE" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="rec_r_cash_detail"> <xs:complexType> <xs:sequence> <xs:element name="rec_r_cash_detail_ID" type="xs:integer" /> <xs:element name="rec_r_cash_header_ID" type="xs:integer" minOccurs="0" /> <xs:element name="CAD-NBR" type="xs:string" minOccurs="0" /> <xs:element name="CAD-NBR1" type="xs:string" minOccurs="0" /> <xs:element name="CAD-CUST-NBR" type="xs:integer" minOccurs="0" /> <xs:element name="CAD-INV-DATE" type="xs:date" minOccurs="0" /> <xs:element name="CAD-INV-NBR" type="xs:string" minOccurs="0" /> <xs:element name="CAD-PAY-AMT" type="xs:decimal" minOccurs="0" /> <xs:element name="CAD-DISC-AMT" type="xs:decimal" minOccurs="0" /> <xs:element name="CAD-ADJ-AMT" type="xs:decimal" minOccurs="0" /> <xs:element name="CAD-ADJ-TYPE" type="xs:string" minOccurs="0" /> <xs:element name="CAD-ADJ-SWT" type="xs:string" minOccurs="0" /> <xs:element name="CAD-UPDATE-STEP" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="rec_cust"> <xs:complexType> <xs:sequence> <xs:element name="rec_cust_ID" type="xs:integer" /> <xs:element name="rec_r_cash_header_ID" type="xs:integer" minOccurs="0" /> <xs:element name="CUSTOMER-NUMBER" type="xs:string" minOccurs="0" /> <xs:element name="CUSTOMER-SHORT-NAME" type="xs:string" minOccurs="0" /> <xs:element name="CUSTOMER-NAME" type="xs:string" minOccurs="0" /> <xs:element name="CM-ADR-1" type="xs:string" minOccurs="0" /> <xs:element name="CM-ADR-2" type="xs:string" minOccurs="0" /> <xs:element name="CM-CITY" type="xs:string" minOccurs="0" /> <xs:element name="CM-STATE" type="xs:string" minOccurs="0" /> <xs:element name="CM-ZIP" type="xs:string" minOccurs="0" /> <xs:element name="CM-ZIP-B" type="xs:string" minOccurs="0" /> <xs:element name="CUSTOMER-PHONE" type="xs:integer" minOccurs="0" /> <xs:element name="CM-INTEREST" type="xs:string" minOccurs="0" /> <xs:element name="CM-SLSMAN" type="xs:string" minOccurs="0" /> <xs:element name="CM-CONTRACT" type="xs:string" minOccurs="0" /> <xs:element name="CM-COMMENT-1" type="xs:string" minOccurs="0" /> <xs:element name="CM-COMMENT-2" type="xs:string" minOccurs="0" /> <xs:element name="ACCOUNT-NBR" type="xs:string" minOccurs="0" /> <xs:element name="CM-TAXABLE" type="xs:string" minOccurs="0" /> <xs:element name="CUSTOMER-FAX" type="xs:integer" minOccurs="0" /> <xs:element name="CM-FOREIGN-ZIP" type="xs:string" minOccurs="0" /> <xs:element name="CM-COUNTRY" type="xs:string" minOccurs="0" /> <xs:element name="CM-CELL" type="xs:integer" minOccurs="0" /> <xs:element name="CUSTOMER-CONTACT" type="xs:string" minOccurs="0" /> <xs:element name="CM-PHONE-EXT" type="xs:integer" minOccurs="0" /> <xs:element name="CM-EMAIL" type="xs:string" minOccurs="0" /> <xs:element name="CM-COUNTY" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> <xs:unique name="rec_r_cash_header_PrimaryKey" msdata:PrimaryKey="true"> <xs:selector xpath=".//mstns:rec_r_cash_header" /> <xs:field xpath="mstns:rec_r_cash_header_ID" /> </xs:unique> <xs:unique name="rec_r_cash_detail_PrimaryKey" msdata:PrimaryKey="true"> <xs:selector xpath=".//mstns:rec_r_cash_detail" /> <xs:field xpath="mstns:rec_r_cash_detail_ID" /> </xs:unique> <xs:unique name="rec_cust_PrimaryKey" msdata:PrimaryKey="true"> <xs:selector xpath=".//mstns:rec_cust" /> <xs:field xpath="mstns:rec_cust_ID" /> </xs:unique> </xs:element> <xs:annotation> <xs:appinfo> <msdata:Relationship name="rec_r_cash_header_rec_r_cash_detail" msdata:parent="rec_r_cash_header" msdata:child="rec_r_cash_detail" msdata:parentkey="rec_r_cash_header_ID" msdata:childkey="rec_r_cash_header_ID" /> </xs:appinfo> </xs:annotation> <xs:annotation> <xs:appinfo> <msdata:Relationship name="rec_r_cash_header_rec_cust" msdata:parent="rec_r_cash_header" msdata:child="rec_cust" msdata:parentkey="rec_r_cash_header_ID" msdata:childkey="rec_r_cash_header_ID" /> </xs:appinfo> </xs:annotation> </xs:schema> <rec_r_cash_header> <rec_r_cash_header_ID>000000000000000001</rec_r_cash_header_ID> <CAH-NBR><![CDATA[00329]]></CAH-NBR> <CAH-CUST-NBR>1</CAH-CUST-NBR> <CAH-CHK-AMT>1500.0000</CAH-CHK-AMT> <CAH-DATE-REC>40315</CAH-DATE-REC> <CAH-CHK-NBR><![CDATA[24533]]></CAH-CHK-NBR> <CAH-UNAPP-CASH>686.0000</CAH-UNAPP-CASH> <CAH-GL-ACC-NBR>0</CAH-GL-ACC-NBR> <CAH-COMMENTS><![CDATA[]]></CAH-COMMENTS> <CAH-YN><![CDATA <CAH-JOB-NBR><![CDATA[ 000]]></CAH-JOB-NBR> <CAH-JOB-NUMBER><![CDATA[]]></CAH-JOB-NUMBER> <CAH-JOB-CHG>0</CAH-JOB-CHG> <CAH-DIRECT-CASH><![CDATA[]]></CAH-DIRECT-CASH> <CAH-APPLY-CR><![CDATA[]]></CAH-APPLY-CR> <CAH-UPDATE-STEP><![CDATA[]]></CAH-UPDATE-STEP> <CAH-EMPLOYEE><![CDATA[chris]]></CAH-EMPLOYEE> </rec_r_cash_header> <rec_r_cash_detail> <rec_r_cash_detail_ID>000000000000000001</rec_r_cash_detail_ID> <rec_r_cash_header_ID>000000000000000001</rec_r_cash_header_ID> <CAD-NBR><![CDATA[003290000108060902866]]></CAD-NBR> <CAD-NBR1><![CDATA[00329]]></CAD-NBR1> <CAD-CUST-NBR>1</CAD-CUST-NBR> <CAD-INV-DATE>2008-06-09</CAD-INV-DATE> <CAD-INV-NBR><![CDATA[02866]]></CAD-INV-NBR> <CAD-PAY-AMT>600.0000</CAD-PAY-AMT> <CAD-DISC-AMT>0.0000</CAD-DISC-AMT> <CAD-ADJ-AMT>0.0000</CAD-ADJ-AMT> <CAD-ADJ-TYPE><![CDATA[]]></CAD-ADJ-TYPE> <CAD-ADJ-SWT><![CDATA <CAD-UPDATE-STEP><![CDATA[]]></CAD-UPDATE-STEP> </rec_r_cash_detail> <rec_r_cash_detail> <rec_r_cash_detail_ID>000000000000000002</rec_r_cash_detail_ID> <rec_r_cash_header_ID>000000000000000001</rec_r_cash_header_ID> <CAD-NBR><![CDATA[00329000010806309063008]]></CAD-NBR> <CAD-NBR1><![CDATA[00329]]></CAD-NBR1> <CAD-CUST-NBR>1</CAD-CUST-NBR> <CAD-INV-DATE>2008-06-30</CAD-INV-DATE> <CAD-INV-NBR><![CDATA[9063008]]></CAD-INV-NBR> <CAD-PAY-AMT>6.0000</CAD-PAY-AMT> <CAD-DISC-AMT>0.0000</CAD-DISC-AMT> <CAD-ADJ-AMT>0.0000</CAD-ADJ-AMT> <CAD-ADJ-TYPE><![CDATA[]]></CAD-ADJ-TYPE> <CAD-ADJ-SWT><![CDATA <CAD-UPDATE-STEP><![CDATA[]]></CAD-UPDATE-STEP> </rec_r_cash_detail> <rec_r_cash_detail> <rec_r_cash_detail_ID>000000000000000003</rec_r_cash_detail_ID> <rec_r_cash_header_ID>000000000000000001</rec_r_cash_header_ID> <CAD-NBR><![CDATA[00329000011006149061410]]></CAD-NBR> <CAD-NBR1><![CDATA[00329]]></CAD-NBR1> <CAD-CUST-NBR>1</CAD-CUST-NBR> <CAD-INV-DATE>2010-06-14</CAD-INV-DATE> <CAD-INV-NBR><![CDATA[9061410]]></CAD-INV-NBR> <CAD-PAY-AMT>6.0000</CAD-PAY-AMT> <CAD-DISC-AMT>0.0000</CAD-DISC-AMT> <CAD-ADJ-AMT>0.0000</CAD-ADJ-AMT> <CAD-ADJ-TYPE><![CDATA[]]></CAD-ADJ-TYPE> <CAD-ADJ-SWT><![CDATA <CAD-UPDATE-STEP><![CDATA[]]></CAD-UPDATE-STEP> </rec_r_cash_detail> <rec_cust> <rec_cust_ID>000000000000000001</rec_cust_ID> <rec_r_cash_header_ID>000000000000000001</rec_r_cash_header_ID> <CUSTOMER-NUMBER><![CDATA[00001]]></CUSTOMER-NUMBER> <CUSTOMER-SHORT-NAME><![CDATA[ATLANTIC]]></CUSTOMER-SHORT-NAME> <CUSTOMER-NAME><![CDATA[Atlantic Air Systems]]></CUSTOMER-NAME> <CM-ADR-1><![CDATA[125 Libbey Parkway]]></CM-ADR-1> <CM-ADR-2><![CDATA[]]></CM-ADR-2> <CM-CITY><![CDATA[Andover]]></CM-CITY> <CM-STATE><![CDATA[MA]]></CM-STATE> <CM-ZIP><![CDATA[02111]]></CM-ZIP> <CM-ZIP-B><![CDATA[0000]]></CM-ZIP-B> <CUSTOMER-PHONE>6175551212</CUSTOMER-PHONE> <CM-INTEREST><![CDATA <CM-SLSMAN><![CDATA[02]]></CM-SLSMAN> <CM-CONTRACT><![CDATA[]]></CM-CONTRACT> <CM-COMMENT-1><![CDATA[No Comment]]></CM-COMMENT-1> <CM-COMMENT-2><![CDATA[]]></CM-COMMENT-2> <ACCOUNT-NBR><![CDATA[0000000]]></ACCOUNT-NBR> <CM-TAXABLE><![CDATA <CUSTOMER-FAX>0</CUSTOMER-FAX> <CM-FOREIGN-ZIP><![CDATA[]]></CM-FOREIGN-ZIP> <CM-COUNTRY><![CDATA[Cooltown]]></CM-COUNTRY> <CM-CELL>0</CM-CELL> <CUSTOMER-CONTACT><![CDATA[Shirley Potts]]></CUSTOMER-CONTACT> <CM-PHONE-EXT>0</CM-PHONE-EXT> <CM-EMAIL><![CDATA[shirley@atlanticair.com]]></CM-EMAIL> <CM-COUNTY><![CDATA[]]></CM-COUNTY> </rec_cust></Cash_Receipts>
WYSIWYG editing tool for end users.
WYSIWYG editing tool for end users.
WYSIWYG editing tool for end users.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.